/*
 * @Author: wangjj3
 * @Date: 2022-10-18 11:35:33
 * @Description: signthequote content
 */
import DefaultResult from '../../common/DefaultResult';

class GswjResult extends DefaultResult {
  constructor(data, param) {
    super(param);
    this.data = data;
  }

  /**
   * 获取人事发文返回值结果
   * @returns 人事发文保存的返回值
   */
  getData = () => {
    const { data } = this;
    if (data) {
      // 业务表单自定义数据
      const document = JSON.parse(data.documentInfo);
      return {
        ...data,
        ...document,
      };
    }
    const res = this.getDefaultResult();
    return {
      ...res,
      principal: res.userName,
      department: res.orgName,
      secret: '0',
      urgencys: '1',
      units: '0',
      contract: res.userName,
      contractPhone: this.param.telphone,
    };
  }
}

export default GswjResult;
